<template>
    <div>
        <chuChaiPrint ref="chuChaiPrintRef" @success="success" />
        <xingZhengPrint ref="xingZhengPrintRef" @success="success" />
        <jiaBanPrint ref="jiaBanPrintRef" @success="success" />
        <liGangPrint ref="liGangPrintRef" @success="success" />
        <qingJiaPrint ref="qingJiaPrintRef" @success="success" />
        <xuanChuanPrint ref="xuanChuanPrintRef" @success="success" />
        <huiYiShiPrint ref="huiYiShiPrintRef" @success="success" />
    </div>
</template>
<script>
import chuChaiPrint from '../onBusiness/print'
import xingZhengPrint from '../applyFor/print'
import jiaBanPrint from '../workOvertime/print'
import liGangPrint from '../departureRequest/print'
import qingJiaPrint from '../holiday/print'
import xuanChuanPrint from '../websiteInformation/print'
import huiYiShiPrint from '../conferenceRoomManagement/print'
export default {
    components: {
        chuChaiPrint,
        xingZhengPrint,
        jiaBanPrint,
        liGangPrint,
        qingJiaPrint,
        xuanChuanPrint,
        huiYiShiPrint,
    },
    data() {
        return {
            printModalList: [
                {type: '出差',ref:'chuChaiPrintRef'},
                {type: '行政',ref:'xingZhengPrintRef'},
                {type: '加班',ref:'jiaBanPrintRef'},
                {type: '离岗',ref:'liGangPrintRef'},
                {type: '请假',ref:'qingJiaPrintRef'},
                {type: '宣传',ref:'xuanChuanPrintRef'},
                {type: '会议室',ref:'huiYiShiPrintRef'},
            ],
        }
    },
    methods: {
        modalClick(type,value,qmValue){
            this.printModalList.forEach((item) => {
                if(item.type == type){
                    this.$refs[item.ref].getData(value,qmValue)
                    this.$refs[item.ref].visible = true
                }
            })
        },
        success(){
            //console.log('success-resetEvent')
            this.$emit('resetEvent')
        }
    },
}
</script>
